#region license
# This file is part of Grawlix.
# 
# Grawlix is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as
# published by the Free Software Foundation, either version 3 of
# the License, or (at your option) any later version.
# 
# Grawlix is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public
# License along with Grawlix.  If not, see
# <http://www.gnu.org/licenses/>.
#endregion

"""A particular series of AnimationFacings with a name."""

namespace Grawlix.Services.Rendering
import System

interface ISpriteAnimation:
"""A series of facings within the animation."""
	
	
	/*
	override def ToString():
	"""
	Get a string representation for this object.
	Returns: A string representation for this object.
	"""
		return "Animation ${_name}"
	
	[property(Name)]
	private _name as string
	"""The name of the animation."""
	
	[property(Duration)]
	private _duration as timespan
	"""The amount of time taken in one pass through the animation."""
	
	def GetEnumerator() as Collections.IEnumerator:
	"""
	Get an enumerator of all the facings within this animation.
	Returns: The enumerator.
	"""
		return _facingList.GetEnumerator()
	
	private _facingList = LinkedList[of AnimationFacing]()
	"""The internal list of animation facings."""
	*/
	
	Name as string:
	"""The name of the animation."""
		get

	Duration as timespan:
	"""The amount of time taken in one pass through the animation."""
		get
	
	def FindNearestFacing(angle as double) as ISpriteFacing
	"""
	Finds the nearest facing from the list.
	Param angle: 
	"""
	